<HTML><HEAD><TITLE>lp_add_constraints(+Handle, +Constraints, ++Integers, -Indices)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(eplex)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>lp_add_constraints(+Handle, +Constraints, ++Integers, -Indices)</H1>
Add new expandable constraints to the demon solver Handle.
<DL>
<DT><EM>Handle</EM></DT>
<DD>Handle to a solver state
</DD>
<DT><EM>Constraints</EM></DT>
<DD>A (possibly empty) list of expandable equality or  inequality constraints
</DD>
<DT><EM>Integers</EM></DT>
<DD>A (possibly empty) list of problem variables to be considered as integers
</DD>
<DT><EM>Indices</EM></DT>
<DD>Indices for the constraints in Constraints
</DD>
</DL>
<H2>Description</H2>
<P>
  Add new expandable constraints (with possibly new variables) to a solver.
  An expandable constraint can be expanded when new variables are added to
  the problem. These constraints are in the form of having a constant on
  the right-hand side, and coefficients for the problem variables on the
  left. When new variables are added (via lp_add_columns/2), the
  coefficients for these variables can be given for the expandable
  constraints. Note that the constraints can only be expanded if there are
  no trigger conditions (i.e. the problem must be solved explicitly), or if
  the problem is not associated with an eplex instance. Otherwise, the
  added constraints are treated as normal (non-expandable) constraints.
</P><P>
  Constraints is a list of expandable constraints.  NewIntegers is a list
  of variables that the external solver should consider as integers,
  Indices is a list of the indices for the added constraints. It is
  returned by the predicate, and has the same length as Constraints. Each
  element in Indices is the index for the constraint in Constraints at the
  same position in the list. This index is used to refer to the constraint
  in lp_add_columns/2.
</P><P>
  Operationally lp_add_constraints/4 behaves like lp_add_constraints/3,
  except that it never trigger the solver as a demon:
  The new constraints will be taken into account the next time the solver
  is run, and  removed on backtracking. The constraints are normalised 
  before being passed to the external solver. Unlike lp_add_constraints/3,
  they are not simplified, and no consistency checks are performed. If any
  of the constraints are ground, a type error is raised. 
</P><P>
  Note that variables in NewIntegers can be any problem variables.
 </P>
<H3>Resatisfiable</H3>
no
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Handle, Constraints or Integers uninstantiated.
<DT><EM>(5) type error </EM>
<DD>Some constraint in Constraints is ground.
<DT><EM>(5) type error </EM>
<DD>Some constraint in Constraints is non-linear.
<DT><EM>(40) stale object handle </EM>
<DD>Handle not valid: solver state had been destroyed by cleanup
</DL>
<H2>See Also</H2>
<A HREF="../../lib/eplex/lp_add_constraints-3.html">lp_add_constraints / 3</A>, <A HREF="../../lib/eplex/lp_demon_setup-5.html">lp_demon_setup / 5</A>, <A HREF="../../lib/eplex/lp_add-3.html">lp_add / 3</A>, <A HREF="../../lib/eplex/lp_add_columns-2.html">lp_add_columns / 2</A>, <A HREF="../../lib/eplex/SE-2.html">$= / 2</A>, <A HREF="../../lib/eplex/SEL-2.html">$=< / 2</A>, <A HREF="../../lib/eplex/SGE-2.html">$>= / 2</A>, <A HREF="../../lib/eplex/ENE-2.html">=:= / 2</A>, <A HREF="../../lib/eplex/EL-2.html">=< / 2</A>, <A HREF="../../lib/eplex/GE-2.html">>= / 2</A>
</BODY></HTML>
